import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'home',
        component: HomeView,
        meta: {
            footShow: true, // true显示，false隐藏
        },
    },
    {
        path: '/about',
        name: 'about',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/AboutView.vue')
    },
    {
        path: '/My',
        name: 'My',
        component: () =>
            import ('../views/My.vue'),
        meta: {
            footShow: true, // true显示，false隐藏
        },
    },

    {

        path: '/Publish',
        name: 'Publish',
        component: () =>
            import ('../views/Publish.vue'),
        meta: {
            footShow: true, // true显示，false隐藏
        },
    },
    {
        path: '/Login',
        name: 'Login',
        component: () =>
            import ('../views/Login.vue'),
        meta: {
            footShow: false, // true显示，false隐藏
        },
    },
    {
        path: '/Search',
        name: 'Search',
        component: () =>
            import ('../views/Search.vue'),
        meta: {
            footShow: false, // true显示，false隐藏
        },
    },
    {
        path: '/User',
        name: 'User',
        component: () =>
            import ('../views/User.vue'),
        meta: {
            footShow: true, // true显示，false隐藏
        },
    },
    {
        path: '/Article',
        name: 'Article',
        component: () =>
            import ('../views/Article.vue'),
        meta: {
            footShow: false, // true显示，false隐藏
        },
    },
    {
        path: '/Logins',
        name: 'Logins',
        component: () =>
            import ('../views/Logins.vue'),
        meta: {
            footShow: false, // true显示，false隐藏
        },
    },
    {
        path: '/Loginsposs',
        name: 'Loginsposs',
        component: () =>
            import ('../views/Loginsposs.vue'),
        meta: {
            footShow: false, // true显示，false隐藏
        },
    },
    {
        path: '/Record',
        name: 'Record',
        component: () =>
            import ('../views/Record.vue'),
        meta: {
            footShow: false, // true显示，false隐藏
        },
    },

]

const router = new VueRouter({
    routes
})

export default router